<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Cdb\V20170320\Models;
use TencentCloud\Common\AbstractModel;

/**
 * Rollback task details
 *
 * @method string getInfo() Obtain Task execution information.
 * @method void setInfo(string $Info) Set Task execution information.
 * @method string getStatus() Obtain Task execution result. Valid values: INITIAL: initializing, RUNNING: running, SUCCESS: succeeded, FAILED: failed, KILLED: terminated, REMOVED: deleted, PAUSED: paused.
 * @method void setStatus(string $Status) Set Task execution result. Valid values: INITIAL: initializing, RUNNING: running, SUCCESS: succeeded, FAILED: failed, KILLED: terminated, REMOVED: deleted, PAUSED: paused.
 * @method integer getProgress() Obtain Task execution progress. Value range: [0,100].
 * @method void setProgress(integer $Progress) Set Task execution progress. Value range: [0,100].
 * @method string getStartTime() Obtain Task start time.
 * @method void setStartTime(string $StartTime) Set Task start time.
 * @method string getEndTime() Obtain Task end time.
 * @method void setEndTime(string $EndTime) Set Task end time.
 * @method array getDetail() Obtain Rollback task details.
Note: this field may return null, indicating that no valid values can be obtained.
 * @method void setDetail(array $Detail) Set Rollback task details.
Note: this field may return null, indicating that no valid values can be obtained.
 */
class RollbackTask extends AbstractModel
{
    /**
     * @var string Task execution information.
     */
    public $Info;

    /**
     * @var string Task execution result. Valid values: INITIAL: initializing, RUNNING: running, SUCCESS: succeeded, FAILED: failed, KILLED: terminated, REMOVED: deleted, PAUSED: paused.
     */
    public $Status;

    /**
     * @var integer Task execution progress. Value range: [0,100].
     */
    public $Progress;

    /**
     * @var string Task start time.
     */
    public $StartTime;

    /**
     * @var string Task end time.
     */
    public $EndTime;

    /**
     * @var array Rollback task details.
Note: this field may return null, indicating that no valid values can be obtained.
     */
    public $Detail;

    /**
     * @param string $Info Task execution information.
     * @param string $Status Task execution result. Valid values: INITIAL: initializing, RUNNING: running, SUCCESS: succeeded, FAILED: failed, KILLED: terminated, REMOVED: deleted, PAUSED: paused.
     * @param integer $Progress Task execution progress. Value range: [0,100].
     * @param string $StartTime Task start time.
     * @param string $EndTime Task end time.
     * @param array $Detail Rollback task details.
Note: this field may return null, indicating that no valid values can be obtained.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Info",$param) and $param["Info"] !== null) {
            $this->Info = $param["Info"];
        }

        if (array_key_exists("Status",$param) and $param["Status"] !== null) {
            $this->Status = $param["Status"];
        }

        if (array_key_exists("Progress",$param) and $param["Progress"] !== null) {
            $this->Progress = $param["Progress"];
        }

        if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
            $this->StartTime = $param["StartTime"];
        }

        if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
            $this->EndTime = $param["EndTime"];
        }

        if (array_key_exists("Detail",$param) and $param["Detail"] !== null) {
            $this->Detail = [];
            foreach ($param["Detail"] as $key => $value){
                $obj = new RollbackInstancesInfo();
                $obj->deserialize($value);
                array_push($this->Detail, $obj);
            }
        }
    }
}
